]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Prevent the link to libgnome-shell-js.so from being removed
authorAlexandre Rostovtsev <tetromino@gentoo.org>
Fri, 6 Apr 2012 18:00:48 +0000 (14:00 -0400)
committerAlexandre Rostovtsev <tetromino@gentoo.org>
Fri, 18 May 2012 22:30:51 +0000 (18:30 -0400)
Add a dummy call to shell_js_add_extension_importer() to ensure that the
link to libgnome-shell-js.so is not removed when using -Wl,--as-needed,
which is the default on many distros.

https://bugzilla.gnome.org/show_bug.cgi?id=670477

src/main.c

index bac9524a330a04931f201363f13b852a306ac75c..fbd13771ab0cb5fd008a3060dae3b952c89549f8 100644 (file)
@@ -24,6 +24,7 @@
 #include "shell-a11y.h"
 #include "shell-global.h"
 #include "shell-global-private.h"
+#include "shell-js.h"
 #include "shell-perf-log.h"
 #include "st.h"
 
@@ -342,3 +343,16 @@ main (int argc, char **argv)
 
   return ecode;
 }
+
+/* HACK:
+   Add a dummy function that calls into libgnome-shell-js.so to ensure it's
+   linked to /usr/bin/gnome-shell even when linking with --as-needed.
+   This function is never actually called.
+   https://bugzilla.gnome.org/show_bug.cgi?id=670477
+*/
+
+void
+_shell_link_to_shell_js (void)
+{
+  shell_js_add_extension_importer (NULL, NULL, NULL, NULL);
+}